<div class="layui-form-item uploadImageBox">
    <label class="layui-form-label">{$form.title}</label>
    <div class="layui-input-block">
        <div class="layui-tab-item layui-show">
            <div class="openMaterialDraggable" id="openMaterial_{$form.field}">
                <?php if(isset($info) && $info[$form['field']]){;?>
                    <?php $images = explode(',',$info[$form['field']]);?>
                    {foreach name="$images" item="vo"}
                    <div class="material-preview">
                        <div class="del-wrap" >
                            <div>
                                <div class="file-item relative" style="height: 100px; width: 100px;">
                                    <div class="el-image image">
                                        <img src="{$vo}" class="el-image__inner" style="object-fit: contain;">
                                    </div>
                                </div>
                            </div>
                            <div class="icon-close uploadDels">
                                <i class="el-icon layui-icon layui-icon-close" style="font-size: 12px; --color: inherit;"></i>
                            </div>
                        </div>
                        <div class="operation-btns text-xs text-center">
                            <span class="openMaterialPreview" data-url="{$vo}">查看</span>
                        </div>
                    </div>
                    {/foreach}
                    <input type="hidden" class="openGallery" name="{$form.field}" id="uploadimage_{$form.field}" value="{$info[$form['field']]}"/>
                <?php }?>
            </div>
            <div class="upload-btn openMaterial" data-name="{$form.field}" data-id="openMaterial_{$form.field}" data-count="{$form.value}" style="width: 100px; height: 100px;">
                <i class="layui-icon layui-icon-addition" style="font-size: 25px; --color: inherit;"></i>
                <span>添加</span>
            </div>
        </div>
    </div>
</div>

<script id="openMaterialTemplate" type="text/html">
    {{# for(var i=0;i<d.data.length ;i++){ }}
    <div class="material-preview">
        <div class="del-wrap" >
            <div>
                <div class="file-item relative" style="height: 100px; width: 100px;">
                    <div class="el-image image">
                        <img src="{{d.data[i]}}" class="el-image__inner" style="object-fit: contain;">
                    </div>
                </div>
            </div>
            <div class="icon-close uploadDels">
                <i class="el-icon layui-icon layui-icon-close" style="font-size: 12px; --color: inherit;"></i>
            </div>
        </div>
        <div class="operation-btns text-xs text-center">
            <span class="openMaterialPreview" data-url="{{d.data[i]}}">查看</span>
        </div>
    </div>
    <input type="hidden" name="{{d.name}}" id="uploadimage_{{d.name}}" value="{{(d.data).join(',')}}"/>
    {{# } }}
</script>

